function apiTabChange(sele,val){
		console.log("w");
		sele.tabChangeType = val;
		sele.activeClass = val;
}


function apiSendMessage(sele){
		if(	sele.message===''){
			return false;
		}
		sele.messageContent[sele.messageContent.length-1].contect.push(
			{
							headImg:'../../images/lefticon/user.png',
								type:0,
								text:sele.message,
								floor:'right'
			}
		)
		sele.message='';
}

function apiEnterChange(self){
//		let _this = this
		document.onkeydown=function(event){
			if((event.keyCode==13)&&(event.ctrlKey)){
				self.enter();
					return false;
				}else if(event.keyCode==13){
					self.send_message();
				return false;
				}
		}
}

function apiScrollHight(){
	let mMessage = document.getElementById('Message');
	mMessage.scrollTop = mMessage.scrollHeight;
}

function apiHistory(){
	 layer.open({
      type: 2,
      title: '历史聊天记录',
      maxmin: false,/*允许最大化*/
      shadeClose: true, //点击遮罩关闭层
      area : ['750px' , '550px'],
      content: './comptent/history.html'
    });
}

function apiAddGroundChat(){
	layer.open({
      type: 2,
      title: '发起群聊',
      maxmin: false,/*允许最大化*/
      shadeClose: true, //点击遮罩关闭层
      area : ['784px' , '612px'],
      content: './comptent/apiAddGroundChat.html'
    });
}

function apiAddFriend(){
	layer.open({
      type: 2,
      title: '添加好友',
      maxmin: false,/*允许最大化*/
      shadeClose: true, //点击遮罩关闭层
      area : ['460px' , '590px'],
      content: './comptent/apiAddFriend.html'
    });
}

function apiShowDt(ev){
	$(ev).parent("dl").toggleClass("dis_blone");
}

function apiShowGroundGongGao(){
	layer.open({
      type: 2,
      title: '群公告',
      maxmin: false,/*允许最大化*/
      shadeClose: true, //点击遮罩关闭层
      area : ['750px' , '550px'],
      content: './comptent/apiShowGroundGongGao.html'
    });
}
